import request from '@/utils/request'
import qs from "querystring"
export default{
    //分页查询
    getStockPagesList(pageNum,pageSize,sort){
        return request({
            url:"/api-goods/stock/stockPages",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort
            }
        })
    },

    //筛选查询
    getStockScreenList(pageNum,pageSize,sort,name,spuNum,orderId,stockType,operationType,adminId,creationTime){
        return request({
            url:"/api-goods/stock/stockScreens",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort,
                name,
                spuNum,
                orderId,
                stockType,
                operationType,
                adminId,
                creationTime
            }
        })
    },

    //批量删除
    getDeleteList(ids){
        var data=qs.stringify({ids})
        return request({
            url:"/api-goods/stock/getDeleteAll",
            method:"delete",
            data
        })
    },

    //类型为1分页查询
    getStockPagesTwoList(pageNum,pageSize,sort){
        return request({
            url:"/api-goods/stock/stockPagesTwo",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort
            }
        })
    },

    //类型为1筛选查询
    getStockScreenTwoList(pageNum,pageSize,sort,name,spuNum,orderId,stockType,operationType,adminId,creationTime){
        return request({
            url:"/api-goods/stock/stockScreenTwo",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort,
                name,
                spuNum,
                orderId,
                stockType,
                operationType,
                adminId,
                creationTime
            }
        })
    },

}